package com.aspose.cells;

public class TableStyleElementCollection extends CollectionBase {
   private TableStyle b;

   TableStyle a() {
      return this.b;
   }

   TableStyleElementCollection(TableStyle tableStyle) {
      this.b = tableStyle;
   }

   /** @deprecated */
   public TableStyleElement getTableStyleElementWithIndex(int index) {
      return this.get(index);
   }

   public TableStyleElement get(int index) {
      return (TableStyleElement)this.a.get(index);
   }

   /** @deprecated */
   public TableStyleElement getTableStyleElementWithType(int type) {
      return this.getByTableStyleElementType(type);
   }

   public TableStyleElement getByTableStyleElementType(int type) {
      for(int var2 = 0; var2 < this.getCount(); ++var2) {
         if (this.get(var2).getType() == type) {
            return this.get(var2);
         }
      }

      return null;
   }

   public int add(int type) {
      for(int var2 = 0; var2 < this.getCount(); ++var2) {
         if (this.get(var2).getType() == type) {
            return var2;
         }
      }

      TableStyleElement var3 = new TableStyleElement(this, type);
      return this.a(var3);
   }

   int a(TableStyleElement var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
      return this.getCount() - 1;
   }

   void a(TableStyleElementCollection var1) {
      for(int var2 = 0; var2 < var1.getCount(); ++var2) {
         TableStyleElement var3 = var1.get(var2);
         TableStyleElement var4 = new TableStyleElement(this, var3.getType());
         var4.a(var3);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
      }

   }
}
